using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools
{
    /// <summary>
    /// <para>Generate Calibration Points</para>
    /// <para>Generates calibration points for any route shape provided, including  complex shapes such as self-closing, self-intersecting, and branched routes.</para>
    /// <para>为提供的任何路径形状生成校准点，包括复杂形状，如自闭合、自相交和分支路径。</para>
    /// </summary>    
    [DisplayName("Generate Calibration Points")]
    public class GenerateCalibrationPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateCalibrationPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_polyline_features">
        /// <para>Input Polyline Features</para>
        /// <para>The features that will be used as the source to calculate the measure values for calibration points.</para>
        /// <para>将用作计算校准点测量值的源的特征。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>The field containing values that uniquely identify each route. The field type must match the Route ID field in the calibration point feature class.</para>
        /// <para>包含唯一标识每个路由的值的字段。字段类型必须与校准点要素类中的路径 ID 字段匹配。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>The field containing the From Date values of a route.</para>
        /// <para>包含工艺路线的“开始日期”值的字段。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>The field containing the To Date values of a route.</para>
        /// <para>包含路由的“截至日期”值的字段。</para>
        /// </param>
        /// <param name="_in_calibration_point_feature_class">
        /// <para>Calibration Point Feature Class</para>
        /// <para>The existing calibration point feature class to which new features will be added.</para>
        /// <para>将添加新要素的现有校准点要素类。</para>
        /// </param>
        /// <param name="_lrs_network">
        /// <para>LRS Network</para>
        /// <para>The LRS Network for which the measure values will be generated in the calibration points feature class.</para>
        /// <para>将在校准点要素类中为其生成测量值的 LRS 网络。</para>
        /// </param>
        public GenerateCalibrationPoints(object _in_polyline_features, object _route_id_field, object _from_date_field, object _to_date_field, object _in_calibration_point_feature_class, object _lrs_network)
        {
            this._in_polyline_features = _in_polyline_features;
            this._route_id_field = _route_id_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
            this._in_calibration_point_feature_class = _in_calibration_point_feature_class;
            this._lrs_network = _lrs_network;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Generate Calibration Points";

        public override string CallName => "locref.GenerateCalibrationPoints";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor", "workspace"];

        public override object[] ParameterInfo => [_in_polyline_features, _route_id_field, _from_date_field, _to_date_field, _in_calibration_point_feature_class, _lrs_network, _calibration_direction.GetGPValue(), _calibration_method.GetGPValue(), _out_calibration_point_feature_class, _out_details_file];

        /// <summary>
        /// <para>Input Polyline Features</para>
        /// <para>The features that will be used as the source to calculate the measure values for calibration points.</para>
        /// <para>将用作计算校准点测量值的源的特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Polyline Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_polyline_features { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>The field containing values that uniquely identify each route. The field type must match the Route ID field in the calibration point feature class.</para>
        /// <para>包含唯一标识每个路由的值的字段。字段类型必须与校准点要素类中的路径 ID 字段匹配。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>The field containing the From Date values of a route.</para>
        /// <para>包含工艺路线的“开始日期”值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>The field containing the To Date values of a route.</para>
        /// <para>包含路由的“截至日期”值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Calibration Point Feature Class</para>
        /// <para>The existing calibration point feature class to which new features will be added.</para>
        /// <para>将添加新要素的现有校准点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calibration Point Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_calibration_point_feature_class { get; set; }


        /// <summary>
        /// <para>LRS Network</para>
        /// <para>The LRS Network for which the measure values will be generated in the calibration points feature class.</para>
        /// <para>将在校准点要素类中为其生成测量值的 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _lrs_network { get; set; }


        /// <summary>
        /// <para>Calibration Direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of increasing calibration on a route when creating new calibration points.</para>
        ///   <bulletList>
        ///     <bullet_item>Digitized direction—The direction of digitization of the Input Polyline Features determines the direction of calibration for the route. This is the default.</bullet_item><para/>
        ///     <bullet_item>Measure direction—The direction of increasing m-values of the Input Polyline Features determines the direction of calibration for the route. If Input Polyline Features does not include m-values, the digitized direction will be used instead.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定创建新校准点时在路径上增加校准的方向。</para>
        ///   <bulletList>
        ///     <bullet_item>数字化方向—输入折线要素的数字化方向决定了路径的校准方向。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>测量方向 - 输入折线要素的 m 值递增方向决定了路径的校准方向。如果输入折线要素不包括 m 值，则将改用数字化方向。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calibration Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _calibration_direction_value _calibration_direction { get; set; } = _calibration_direction_value._DIGITIZED_DIRECTION;

        public enum _calibration_direction_value
        {
            /// <summary>
            /// <para>Digitized direction</para>
            /// <para>Digitized direction—The direction of digitization of the Input Polyline Features determines the direction of calibration for the route. This is the default.</para>
            /// <para>数字化方向—输入折线要素的数字化方向决定了路径的校准方向。这是默认设置。</para>
            /// </summary>
            [Description("Digitized direction")]
            [GPEnumValue("DIGITIZED_DIRECTION")]
            _DIGITIZED_DIRECTION,

            /// <summary>
            /// <para>Measure direction</para>
            /// <para>Measure direction—The direction of increasing m-values of the Input Polyline Features determines the direction of calibration for the route. If Input Polyline Features does not include m-values, the digitized direction will be used instead.</para>
            /// <para>测量方向 - 输入折线要素的 m 值递增方向决定了路径的校准方向。如果输入折线要素不包括 m 值，则将改用数字化方向。</para>
            /// </summary>
            [Description("Measure direction")]
            [GPEnumValue("MEASURE_DIRECTION")]
            _MEASURE_DIRECTION,

        }

        /// <summary>
        /// <para>Calibration Method</para>
        /// <para><xdoc>
        ///   <para>The method used to determine the measures on a route when creating calibration points.</para>
        ///   <bulletList>
        ///     <bullet_item>Geometry length—Only geometry length is supported as the calibration method.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在创建校准点时用于确定路径上的测量值的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>几何长度 - 仅支持几何长度作为校准方法。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calibration Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _calibration_method_value _calibration_method { get; set; } = _calibration_method_value._GEOMETRY_LENGTH;

        public enum _calibration_method_value
        {
            /// <summary>
            /// <para>Geometry length</para>
            /// <para>Geometry length—Only geometry length is supported as the calibration method.</para>
            /// <para>几何长度 - 仅支持几何长度作为校准方法。</para>
            /// </summary>
            [Description("Geometry length")]
            [GPEnumValue("GEOMETRY_LENGTH")]
            _GEOMETRY_LENGTH,

        }

        /// <summary>
        /// <para>Updated Calibration Point Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Calibration Point Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_calibration_point_feature_class { get; set; }


        /// <summary>
        /// <para>Output Details File</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Details File")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_details_file { get; set; }


        public GenerateCalibrationPoints SetEnv(object parallelProcessingFactor = null, object workspace = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor, workspace: workspace);
            return this;
        }

    }

}